package com.dnb.webmash.playmaker.client;

import com.dnb.webmash.playmaker.shared.MyURL;
import com.google.gwt.core.client.JavaScriptObject;

public class ClientFieldVerifier extends JavaScriptObject{
protected ClientFieldVerifier(){	
}
	public static native boolean isValidURL(String s) 
	/*-{
		var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
		return regexp.test(s);		
	 }-*/;
	public static native String getBaseDomain(MyURL myURL) 
	/*-{
		var regexp = /((ftp|http|https):((\/\/)|(\\\\))+[^\/]*)/
		return regexp.exec(myURL);
	}-*/;

}
